using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ServerTools
{
    /// <summary>
    /// <para>Update Globe Server Cache</para>
    /// <para>Updates a pre-rendered tiled cache for Globe Server.</para>
    /// <para>更新 Globe Server 的预渲染切片缓存。</para>
    /// </summary>    
    [DisplayName("Update Globe Server Cache")]
    public class UpdateGlobeServerCache : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public UpdateGlobeServerCache()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_server_name">
        /// <para>Host</para>
        /// <para></para>
        /// <para></para>
        /// </param>
        /// <param name="_object_name">
        /// <para>GlobeServer Object</para>
        /// <para></para>
        /// <para></para>
        /// </param>
        /// <param name="_Layer">
        /// <para>Input Layers</para>
        /// <para></para>
        /// <para></para>
        /// </param>
        /// <param name="_lod_from">
        /// <para>From Level of Detail</para>
        /// <para></para>
        /// <para></para>
        /// </param>
        /// <param name="_lod_to">
        /// <para>To Level of Detail</para>
        /// <para></para>
        /// <para></para>
        /// </param>
        /// <param name="_update_mode">
        /// <para>Update Mode</para>
        /// <para></para>
        /// <para></para>
        /// </param>
        public UpdateGlobeServerCache(object _server_name, object _object_name, List<object> _Layer, _lod_from_value? _lod_from, _lod_to_value? _lod_to, _update_mode_value? _update_mode)
        {
            this._server_name = _server_name;
            this._object_name = _object_name;
            this._Layer = _Layer;
            this._lod_from = _lod_from;
            this._lod_to = _lod_to;
            this._update_mode = _update_mode;
        }
        public override string ToolboxName => "Server Tools";

        public override string ToolName => "Update Globe Server Cache";

        public override string CallName => "server.UpdateGlobeServerCache";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_server_name, _object_name, _update_extent, _Layer, _lod_from.GetGPValue(), _lod_to.GetGPValue(), _thread_count, _update_mode.GetGPValue()];

        /// <summary>
        /// <para>Host</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Host")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _server_name { get; set; }


        /// <summary>
        /// <para>GlobeServer Object</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("GlobeServer Object")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _object_name { get; set; }


        /// <summary>
        /// <para>Update Extent</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Update Extent")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _update_extent { get; set; } = null;


        /// <summary>
        /// <para>Input Layers</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Layers")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _Layer { get; set; }


        /// <summary>
        /// <para>From Level of Detail</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("From Level of Detail")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _lod_from_value? _lod_from { get; set; }

        public enum _lod_from_value
        {
            /// <summary>
            /// <para>Globe - 1:10000000</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Globe - 1:10000000")]
            [GPEnumValue("Globe - 1:10000000")]
            value0,

            /// <summary>
            /// <para>Continent - 1:5000000</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Continent - 1:5000000")]
            [GPEnumValue("Continent - 1:5000000")]
            value1,

            /// <summary>
            /// <para>Countries - 1:2500000</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Countries - 1:2500000")]
            [GPEnumValue("Countries - 1:2500000")]
            value2,

            /// <summary>
            /// <para>Country - 1:1250000</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Country - 1:1250000")]
            [GPEnumValue("Country - 1:1250000")]
            value3,

            /// <summary>
            /// <para>States - 1:625000</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("States - 1:625000")]
            [GPEnumValue("States - 1:625000")]
            value4,

            /// <summary>
            /// <para>State - 1:312500</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("State - 1:312500")]
            [GPEnumValue("State - 1:312500")]
            value5,

            /// <summary>
            /// <para>Counties - 1:156250</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Counties - 1:156250")]
            [GPEnumValue("Counties - 1:156250")]
            value6,

            /// <summary>
            /// <para>County - 1:78125</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("County - 1:78125")]
            [GPEnumValue("County - 1:78125")]
            value7,

            /// <summary>
            /// <para>Metropolitan Area - 1:39062</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Metropolitan Area - 1:39062")]
            [GPEnumValue("Metropolitan Area - 1:39062")]
            value8,

            /// <summary>
            /// <para>Cities - 1:19531</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Cities - 1:19531")]
            [GPEnumValue("Cities - 1:19531")]
            value9,

            /// <summary>
            /// <para>City - 1:9765</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("City - 1:9765")]
            [GPEnumValue("City - 1:9765")]
            value10,

            /// <summary>
            /// <para>Town - 1:4882</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Town - 1:4882")]
            [GPEnumValue("Town - 1:4882")]
            value11,

            /// <summary>
            /// <para>Neighborhood - 1:2441</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Neighborhood - 1:2441")]
            [GPEnumValue("Neighborhood - 1:2441")]
            value12,

            /// <summary>
            /// <para>City Blocks - 1:1220</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("City Blocks - 1:1220")]
            [GPEnumValue("City Blocks - 1:1220")]
            value13,

            /// <summary>
            /// <para>City Block - 1:610</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("City Block - 1:610")]
            [GPEnumValue("City Block - 1:610")]
            value14,

            /// <summary>
            /// <para>Buildings - 1:305</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Buildings - 1:305")]
            [GPEnumValue("Buildings - 1:305")]
            value15,

            /// <summary>
            /// <para>Building - 1:152</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Building - 1:152")]
            [GPEnumValue("Building - 1:152")]
            value16,

            /// <summary>
            /// <para>Houses - 1:76</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Houses - 1:76")]
            [GPEnumValue("Houses - 1:76")]
            value17,

            /// <summary>
            /// <para>House Property - 1:38</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("House Property - 1:38")]
            [GPEnumValue("House Property - 1:38")]
            value18,

            /// <summary>
            /// <para>House - 1:19</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("House - 1:19")]
            [GPEnumValue("House - 1:19")]
            value19,

            /// <summary>
            /// <para>Rooms - 1:9</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Rooms - 1:9")]
            [GPEnumValue("Rooms - 1:9")]
            value20,

            /// <summary>
            /// <para>Room - 1:4</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Room - 1:4")]
            [GPEnumValue("Room - 1:4")]
            value21,

        }

        /// <summary>
        /// <para>To Level of Detail</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("To Level of Detail")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _lod_to_value? _lod_to { get; set; }

        public enum _lod_to_value
        {
            /// <summary>
            /// <para>Room - 1:4</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Room - 1:4")]
            [GPEnumValue("Room - 1:4")]
            value0,

            /// <summary>
            /// <para>Rooms - 1:9</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Rooms - 1:9")]
            [GPEnumValue("Rooms - 1:9")]
            value1,

            /// <summary>
            /// <para>House - 1:19</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("House - 1:19")]
            [GPEnumValue("House - 1:19")]
            value2,

            /// <summary>
            /// <para>House Property - 1:38</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("House Property - 1:38")]
            [GPEnumValue("House Property - 1:38")]
            value3,

            /// <summary>
            /// <para>Houses - 1:76</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Houses - 1:76")]
            [GPEnumValue("Houses - 1:76")]
            value4,

            /// <summary>
            /// <para>Building - 1:152</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Building - 1:152")]
            [GPEnumValue("Building - 1:152")]
            value5,

            /// <summary>
            /// <para>Buildings - 1:305</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Buildings - 1:305")]
            [GPEnumValue("Buildings - 1:305")]
            value6,

            /// <summary>
            /// <para>City Block - 1:610</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("City Block - 1:610")]
            [GPEnumValue("City Block - 1:610")]
            value7,

            /// <summary>
            /// <para>City Blocks - 1:1220</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("City Blocks - 1:1220")]
            [GPEnumValue("City Blocks - 1:1220")]
            value8,

            /// <summary>
            /// <para>Neighborhood - 1:2441</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Neighborhood - 1:2441")]
            [GPEnumValue("Neighborhood - 1:2441")]
            value9,

            /// <summary>
            /// <para>Town - 1:4882</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Town - 1:4882")]
            [GPEnumValue("Town - 1:4882")]
            value10,

            /// <summary>
            /// <para>City - 1:9765</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("City - 1:9765")]
            [GPEnumValue("City - 1:9765")]
            value11,

            /// <summary>
            /// <para>Cities - 1:19531</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Cities - 1:19531")]
            [GPEnumValue("Cities - 1:19531")]
            value12,

            /// <summary>
            /// <para>Metropolitan Area - 1:39062</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Metropolitan Area - 1:39062")]
            [GPEnumValue("Metropolitan Area - 1:39062")]
            value13,

            /// <summary>
            /// <para>County - 1:78125</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("County - 1:78125")]
            [GPEnumValue("County - 1:78125")]
            value14,

            /// <summary>
            /// <para>Counties - 1:156250</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Counties - 1:156250")]
            [GPEnumValue("Counties - 1:156250")]
            value15,

            /// <summary>
            /// <para>State - 1:312500</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("State - 1:312500")]
            [GPEnumValue("State - 1:312500")]
            value16,

            /// <summary>
            /// <para>States - 1:625000</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("States - 1:625000")]
            [GPEnumValue("States - 1:625000")]
            value17,

            /// <summary>
            /// <para>Country - 1:1250000</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Country - 1:1250000")]
            [GPEnumValue("Country - 1:1250000")]
            value18,

            /// <summary>
            /// <para>Countries - 1:2500000</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Countries - 1:2500000")]
            [GPEnumValue("Countries - 1:2500000")]
            value19,

            /// <summary>
            /// <para>Continent - 1:5000000</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Continent - 1:5000000")]
            [GPEnumValue("Continent - 1:5000000")]
            value20,

            /// <summary>
            /// <para>Globe - 1:10000000</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Globe - 1:10000000")]
            [GPEnumValue("Globe - 1:10000000")]
            value21,

        }

        /// <summary>
        /// <para>Number of GlobeServer instances</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Number of GlobeServer instances")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long? _thread_count { get; set; } = null;


        /// <summary>
        /// <para>Update Mode</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Update Mode")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _update_mode_value? _update_mode { get; set; }

        public enum _update_mode_value
        {
            /// <summary>
            /// <para>Recreate Empty Tiles</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Recreate Empty Tiles")]
            [GPEnumValue("Recreate Empty Tiles")]
            _Recreate_Empty_Tiles,

            /// <summary>
            /// <para>Recreate All Tiles</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Recreate All Tiles")]
            [GPEnumValue("Recreate All Tiles")]
            _Recreate_All_Tiles,

        }

        public UpdateGlobeServerCache SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}